import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/6/10
 * Time:13:56
 **/
public class Main1 {
    /**
     * 每日一题-乒乓球筐
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            boolean contain = true;
            StringBuffer A = new StringBuffer(sc.next());
            char[] B = sc.next().toCharArray();
            for (char c : B) {
                int index = A.indexOf(String.valueOf(c));//String.valueOf(c)表示将c换为String类型
                if (index != -1)//找到则在A中删除
                    A.deleteCharAt(index);//移除在此序列中的指定位置(index表示要删除字符的索引)的char值
                else {
                    System.out.println("No");
                    contain = false;
                    break;
                }
            }
            if (contain)
                System.out.println("Yes");
        }
    }

    /**
     * 有问题
     * @param args
     */
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            boolean state = true;
            String A = sc.next();
            String B = sc.next();
            Set<Character> set = new HashSet<>();
            for(int i = 0; i< A.length();i++) {
                set.add(A.charAt(i));
            }
            for(int i = 0; i< B.length();i++) {
                if(set.contains(B.charAt(i))) {
                    set.remove(B.charAt(i));
                }else {
                    System.out.println("No");
                    state = false;
                    break;
                }
            }
            if(state){
                System.out.println("Yes");
            }
        }
    }
}
